package values.item.building
{
/**
 * BuildingUpgradeRequirementValue
 * @author jliang
 *
 */
public class BuildingUpgradeRequirementValue
{
	[Data(type="field", mapping="city_level_required")]
	public var cityLevelRequired:int;
	
	public function get hasCityLevelRequired():Boolean
	{
		return cityLevelRequired > 1;
	}
	
	[Data(type="field", mapping="level_required")]
	public var levelRequired:int;
	
	public function get hasLevelRequired():Boolean
	{
		return levelRequired > 1;
	}
	
	[Data(type="field", mapping="quest_required")]
	public var questRequired:String;
	
	public function get hasQuestRequired():Boolean
	{
		return questRequired != null && questRequired != "";
	}
	
	public function clone():BuildingUpgradeRequirementValue
	{
		var vo:BuildingUpgradeRequirementValue = new BuildingUpgradeRequirementValue();
		vo.cityLevelRequired = cityLevelRequired;
		vo.levelRequired = levelRequired;
		vo.questRequired = questRequired;
		return vo;
	}
}
}




